package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.mapper.MemberMapper;
import com.itheima.mapper.OrderMapper;
import com.itheima.pojo.Member;
import com.itheima.pojo.Order;
import com.itheima.service.MemberService;
import com.itheima.service.OrderService;
import org.apache.dubbo.config.annotation.Service;

/**
 * @author jshstart
 * @creat 2020-11-15 13:08
 */
@Service
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements MemberService {
    @Override
    public Member findMember(String telephone) {
        QueryWrapper<Member> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("telephone",telephone);
        Member member = this.getOne(queryWrapper);
        return member;
    }

    @Override
    public int findTodayNewMember(String formatDate) {
        return this.baseMapper.findTodayNewMember(formatDate);
    }

    @Override
    public int findThisWeekNewMember(int thisweek) {
        return this.baseMapper.findThisWeekNewMember(thisweek);
    }

    @Override
    public int findThisMonthNewMember(String thismonth) {
        return this.baseMapper.findThisMonthNewMember(thismonth);
    }

}
